
#include <iostream>

using namespace std;

int main()

{
    string a,b;
    cout<<"ingrese palabra1:"<<endl;
    cin>>a;
    cout<<"ingrese palabra2:"<<endl;
    cin>>b;

    if (a[a.length()-1] == b[b.length()-1])

    {
        cout<<"son iguales";
    }

    else
    {
        cout<<"son diferentes";
    }







    return 1;
}
